<template>
	<view class="organization-content" >
		
		<view class="search u-flex-between">
			<view class="left u-flex-center" @click="SreenClick" style="">
				<view class="mr-10 text-gray">
					{{bmmc}}
				</view>
				<view class="u-flex">
					<u-icon name="arrow-down-fill" color="#fd7400" size="24"></u-icon>
				</view>
			</view>
			<view class="center u-flex-center text-gray">
				{{keyword}}
			</view>
			<view class="right u-flex-center" @click="searchMember">
				<view class="mr-5 text-gray">
					搜索
				</view>
				<view class="">
					<u-icon name="search" color="#fd7400" size="44"></u-icon>
				</view>
			</view>
		</view>
		<view class="cy-list">
			<view class="" v-if="ygList.length == 0" style="height: 100%;">
				<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png" text="请先添加成员" textSize="36"
					iconSize="60">
				</u-empty>
			</view> 
			<view class="cy-item" v-for="(item) in searchList">
				<view class="u-flex-between">
					<view class="left u-flex" @click="editYg(item)">
						<view class="cy-img mr-10">
							<u-avatar :src="src" size="112" shape="square"></u-avatar>
						</view>
						<view class="cy-name">
							<view class="f700 " style="font-size: 32rpx;">
								{{item.name}}
							</view>
							<view class="text-gray" style="font-size: 28rpx;">
								{{item.phone}}
							</view>
						</view>
					</view>
					<view class="right" style="">
						<view class="cy-switch" style="">
							<view class="f700 text-gray">
								移动端权限
							</view>
							<view class="" style="display: flex;justify-content: flex-end;">
								<u-switch @change="MobileChange(item)" size="44" activeColor="#fd7400"
									v-model="item.isAdminMobile"></u-switch>
							</view>
						</view>
					</view>
				</view>

			</view>
		</view>  
		<view class="footer" @click="addMemPup">
			<u-button :customStyle="orangeBtn2">添加成员</u-button>
		</view>
		
		
		<custompop
		ref="cuspop_bmscreen"
		ptitle="部门筛选"
		@saveclick="DepartScreen"
		>
			<template slot="content">
				<view class="popup-c">
					<view class="popup-content">
						<view class="title">
							部门筛选
						</view>
						<view style="padding: 10rpx;">
							<view class="u-grid">
								<view v-for="(item,index) in option" class="tagA" :class="{isActive:currindex===index}">
									<view class="" @click="change1(item,index)">
										{{item.stName}}
									</view>
								</view>
							</view>
						</view>
						<view style="padding: 10rpx;" v-if="range.length > 0">
							<view class="title">
								二级部门
							</view>
							<view style="padding: 10rpx;">
								<view class="u-grid"> 
									<view v-for="(item,index) in range" class="tagA"
										:class="{isActive:currindex2===index}">
										<view class="" @click="change2(item,index)">
											{{item.stName}}
										</view>
									</view>
								</view>
							</view>
						</view>
						<view class="" v-if="range1.length > 0">
							<view class="title">
								三级部门
							</view>
							<view style="padding: 10rpx;">
								<view class="u-grid">
									<view v-for="(item,index) in range1" :class="{isActive:currindex3===index}"
										class="tagA">
										<view class="" @click="change3(item,index)">
											{{item.stName}}
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					
				</view>
			</template>
		</custompop>
		
		<!-- 编辑成员 -->
		
		<custompop
		ref="cuspop_editMember"
		ptitle="成员编辑"
		:delbtn="true"
		@saveclick="updateEmp"
		@closeclick="closeclick"
		>
			<template slot="content">
				<template slot="content">
					
					<view class="popForm">
						
						<view class="form_line FlexBetween" >
							<view class="leftit">
								成员姓名
							</view>
							<view class="right_area inputbox">
								<input type="text" placeholder="请输入成员姓名"
								v-model.trim="EditForm.name"
								>
							</view>
						</view>
						<view class="form_line FlexBetween" >
							<view class="leftit">
								成员账号
							</view>
							<view class="right_area inputbox">
								<input type="text" placeholder="请输入成员账号号码"
								v-model.trim="EditForm.no"
								>
							</view>
						</view>
						<view class="form_line FlexBetween" >
							<view class="leftit">
								成员手机
							</view>
							<view class="right_area inputbox">
								<input type="text" placeholder="请输入成员手机号码"
								v-model.trim="EditForm.phone"
								>
							</view>
						</view>
						<view class="form_line FlexBetween" >
							<view class="leftit">
								确认密码
							</view>
							<view class="right_area inputbox">
								<input type="password" :placeholder="pwdtext">
							</view>
						</view>
						
						
						<view class="form_line FlexBetween" @click="selectDepart_edit">
							<view class="leftit">
								部门 
							</view>
							<view class="right_area selectBox FlexAlign">
								<view class="valtx">
									{{EditForm.bm}}
								</view>
								<view class="u-flex">
									<u-icon name="arrow-right"></u-icon>
								</view>
							</view>
						</view>
						
						<view class="form_line FlexBetween" @click="selectRole_edit">
							<view class="leftit">
								角色
							</view>
							<view class="right_area selectBox FlexAlign">
								<view class="valtx">
									{{EditForm.js}}
								</view>
								<view class="u-flex">
									<u-icon name="arrow-right"></u-icon>
								</view>
							</view>
						</view>
						
					</view>
									
				</template>
			</template>
		</custompop>
		
		<!-- 添加成员 -->
		<custompop
		ref="cuspop_addMember"
		ptitle="添加成员"
		@saveclick="addMember_save"
		@closeclick="closeclick"
		>
			<template slot="content">
				<template slot="content">
					
					<view class="popForm">
						
						<view class="form_line FlexBetween" >
							<view class="leftit">
								登录账号
							</view>
							<view class="right_area defFont FlexAlign" @click="queryPhone">
								查询
								<view class="u-flex">
									<u-icon name="search" size="44"></u-icon>
								</view>
							</view>
						</view>
						<view class="form_line FlexBetween" >
							<view class="leftit">
								成员手机
							</view>
							<view class="right_area inputbox">
								<input type="text" placeholder="请输入成员手机号码"
								v-model.trim="addForm.phone"
								>
							</view>
						</view>
						<view class="form_line FlexBetween" >
							<view class="leftit">
								成员姓名
							</view>
							<view class="right_area inputbox">
								<input type="text" placeholder="请输入成员姓名"
								v-model.trim="addForm.name"
								>
							</view>
						</view>
						
						<view class="form_line FlexBetween" @click="selectDepart_create">
							<view class="leftit">
								部门 
							</view>
							<view class="right_area selectBox FlexAlign">
								<view class="valtx">
									{{addForm.bm}}
								</view>
								<view class="u-flex">
									<u-icon name="arrow-right"></u-icon>
								</view>
							</view>
						</view>
						
						<view class="form_line FlexBetween" @click="selectRole_create">
							<view class="leftit">
								角色
							</view>
							<view class="right_area selectBox FlexAlign">
								<view class="valtx">
									{{addForm.js}}
								</view>
								<view class="u-flex">
									<u-icon name="arrow-right"></u-icon>
								</view>
							</view>
						</view>
						
					</view>
									
				</template>
			</template>
		</custompop>
		
		<!-- 选择角色 -->
		<custompop
		ref="cuspop_selRole"
		ptitle="选择角色"
		:isselect="true"
		:radioarr="roleselstr"
		@outputradio="outradio_role"
		>
		</custompop>
		
		<!-- 选择部门 -->
		<custompop 
		ref="cuspop_seldepart"
		ptitle="选择部门"
		:isselect="true"
		:radioarr="departselstr"
		@outputradio="outradio_depart"
		>
		</custompop>
		
		<!-- 账号查询 -->
		<custompop
		ref="cuspop_accosearch"
		ptitle="账号查询"
		savetxt="查询"
		@saveclick="inquireAccount"
		@closeclick="closeclick"
		>
			<template slot="content">
				<view class="edit-form">
					<u--input placeholder="请输入手机号" border="surround" suffixIcon="search"
						suffixIconStyle="color: #909399;font-size: 22px;" 
						:customStyle="searchCss"
						v-model.trim="addForm.no"></u--input>
				</view>
			</template>
		</custompop>
			
		
		<!-- 成员搜索 -->
		<!-- @click="" -->
		<custompop
		ref="cuspop_memsearch"
		ptitle="成员搜索"
		savetxt="查询"
		@saveclick="searchCountList"
		@closeclick="searchCountList"
		>
			<template slot="content">
				<view class="edit-form">
					<u--input placeholder="请输入内容" border="surround" suffixIcon="search"
						suffixIconStyle="color: #909399;font-size: 22px;" 
						:customStyle="searchCss"
						v-model.trim="keyword"></u--input>
				</view>
			</template>
		</custompop>
		
		

	

	</view>
</template>

<script>
	export default {
		data() {
			return {
				bottomBtn: {
					bottom: 0,
				},
				orangeBtn: {
					height: '50px !important',
					// boxShadow: '0 7px 40px rgba(235 151 43 / 30%)',
					background: '#fd7400',
					border: '0',
					boxShadow: '0px 7px 40px  rgba(253, 112, 8, 0.2)',
					borderRadius: '8px',
					fontSize: '18px',
					width: '200px'
				},
				orangeBtn2: {
					// height: '50px !important',
					// // boxShadow: '0 7px 40px rgba(235 151 43 / 30%)',
					// background: '#fd7400',
					// border: '0',
					// boxShadow: '0px 7px 40px  rgba(253, 112, 8, 0.2)',
					// borderRadius: '8px',
					// fontSize: '18px',
					// color: '#fff'
					
					height: '50px',
					background: 'linear-gradient(90deg, #fd7400 0%, #ff5733 100%)',
					boxShadow: '0px 7rpx 40rpx rgba(253, 112, 8, 0.2)',
					borderRadius: '16rpx',
					fontSize: '36rpx',
					color: '#fff',
				},
				cancelBtn: {
					height: '50px !important',
					border: '0',
					borderRadius: '8px',
					fontSize: '18px',
					width: '120px',
					color: '#999',
					backGround: '#fff'
				},
			
				bmmc: '',
				delId: '',
				show: false,
				
			
		
			
		
				
				currindex: -1,
				currindex2: -1,
				currindex3: -1,
				currindex4: -1,
				currindex5: -1,
				custAccId: '',
				label: '',
				keyword: '',
				range: [],
				range1: [],
				data: [],
				empStrucAcc: [],
				empRoles: [],
				option: [

				],
				ygList: [],
				bmId: '',
				strucId: '',
				roleList: [],
				ygId: '',
				acId: "",
				EditForm: {
					phone: '',
					name: '',
					no: '',
					pwd: '',
					bm: "",
					js: ''
				},
				src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
				switchValue: '',
				searchCss: {
					height: '54px'
				},
				addForm: {
					phone: '',
					name: "",
					bm: '',
					js: "",
					no: ''
				},
				saveEmp: {
					custAccId: '',
					acId: '',
					accountId: '',
					department: '',
					name: '',
					phone: "",
					role: '',
				},
				pwdtext: '空则不修改',

				// 部门列表数据
				department_data: [],
				// 部门选择列表字符串
				departselstr: '', 
				// 角色选择列表字符串
				roleselstr: '', 
				// 筛选部门id
				SreenId: '',
				
				//搜索数据
				searchList: [],
			};
		},
		onLoad() {
			this.custAccId = uni.getStorageSync('custAccid')
			this.acId = uni.getStorageSync('acId')
			this.find_AllRole();
			this.bottomBtn.bottom = uni.getStorageSync('tabbarHeight');
			console.log(this.bottomBtn.bottom)
		},
		// 下拉刷新
		onPullDownRefresh() {
			this.getPullRefresh()
		},
		watch: {
			ygList: {
				handler(newVal) {
					this.searchList = newVal;
				},
				deep: true,
			},
		},
		methods: {
			// 下拉刷新请求数据
			getPullRefresh(){
				console.clear()
				this.find_AllRole()
			},
			// 列表搜索
			searchMember(){
				// 调出弹窗
				if(this.$refs.cuspop_memsearch) {
					this.keyword = '';
					this.$refs.cuspop_memsearch.pupshow = true
				}
			},
			
			// 添加角色点击
			addMemPup() {
				// 设置部门默认值
				let d_list = this.department_data
				if (d_list[0]) {
					this.addForm.bm = d_list[0].stName
					this.saveEmp.department = d_list[0].id
				}
				this.departselstr = ''
				// 设置角色默认值 
				let r_list = this.roleList
				if (r_list[0]) {
					this.addForm.js = r_list[0].label
					this.saveEmp.role = r_list[0].value
				}
				this.roleselstr = ''
				// 调出弹窗
				if(this.$refs.cuspop_addMember) {
					this.$refs.cuspop_addMember.pupshow = true
				}
			},
			// 查询登录账号
			queryPhone(){
				// 调出弹窗
				if(this.$refs.cuspop_accosearch) {
					this.$refs.cuspop_accosearch.pupshow = true
				}
			},
			// 选择部门 isEdit: 是否为编辑
			selectDepart_create(){
				let checkval = this.addForm.bm || ''
				this.DepartPublicFn(checkval)
			},
			selectDepart_edit(){
				let checkval = this.EditForm.bm || ''
				this.DepartPublicFn(checkval)
			},
			DepartPublicFn(defval){
				let d_list = JSON.parse(JSON.stringify(this.department_data))
				for(let item of d_list) {
					item.label = item.stName
					this.$set(item, 'ischeck', false) 
					if(defval == item.stName) {
						this.$set(item, 'ischeck', true) 
					}
				}
				this.departselstr = JSON.stringify(d_list)
				// 调出弹窗
				if(this.$refs.cuspop_seldepart) {
				 	this.$refs.cuspop_seldepart.pupshow = true
				}
			},
			// 选择角色
			selectRole_create(){
				let checkval = this.addForm.js || ''
				this.RolesPublicFn(checkval)
			},
			selectRole_edit(isEdit){
				let checkval = this.EditForm.js || ''
				this.RolesPublicFn(checkval)
			},
			RolesPublicFn(defval){
				let d_list = JSON.parse(JSON.stringify(this.roleList))
				for(let item of d_list) {
					item.id = item.value
					this.$set(item, 'ischeck', false) 
					if(defval == item.label) {
						this.$set(item, 'ischeck', true) 
					}
				}
				this.roleselstr = JSON.stringify(d_list)
				// 调出弹窗
				if(this.$refs.cuspop_selRole) {
					this.$refs.cuspop_selRole.pupshow = true
				}
			},
			// 筛选弹出
			SreenClick(){
				if(this.$refs.cuspop_bmscreen) {
					this.$refs.cuspop_bmscreen.pupshow = true
				}
			},
			// 筛选确定
			DepartScreen(){
				if(!this.SreenId) return
				this.findAccountList(this.SreenId)
			},
			change1(e, index) {
				this.range = this.department_data.filter(i => e.id == i.stFather).map(i => {
					return {
						...i,
						text: i.stName,
						value: i.id
					}
				});
				this.range1 = [];
				this.bmId = e.id
				this.strucId = e.id
				// this.findAccountList(e.id)
				this.currindex = index
				this.currindex2 = -1
				this.currindex3 = -1
				this.bmmc = e.text
				
				this.SreenId = e.id
			},
			change2(e, index) {
				this.strucId = e.id
				this.bmmc = e.stName
				this.range1 = this.department_data.filter(i => e.id == i.stFather).map(i => {
					return {
						...i,
						text: i.stName,
						value: i.id
					}
				});
				this.bmId = e.id
				// this.findAccountList(e.id)
				this.currindex2 = index
				this.currindex3 = -1
				
				this.SreenId = e.id
			},
			change3(e, index) {
				this.bmId = e.id
				this.bmmc = e.stName
				this.currindex3 = index
			},
			// 查询角色权限
			async find_AllRole() {
				const res = await uni.$api.authority.findAllRole({
					custAccId: this.custAccId
				})
				let list = res.data || [];
				list = list.map((v, i) => {
					return {
						label: v.roName,
						value: v.id,
					}
				})
				list.push({
					label: '系统超级管理员',
					value: 0,
				})
				this.roleList = list;
				this.find_AllStructure()
			
			},
			// 获取部门数据
			async find_AllStructure() {
				const res = await uni.$api.organization.findAllStructure({
					custAccId: this.custAccId
				})
				let datalist = res.data || []
				this.department_data = datalist
				this.data = datalist
				this.option = datalist.filter(i => i.stFather == 0).map(i => {
					return {
						...i,
						text: i.stName,
						value: i.id
					}
				})
				let index = 0; //选中指针
				this.bmmc = this.option[index].stName
				this.currindex = index;
				this.currindex4 = index
				this.currindex5 = index
				this.strucId = this.option[index].id
				this.range = datalist.filter(i => this.strucId == i.stFather).map(i => {
					return {
						...i,
						text: i.stName,
						value: i.id
					}
				});
				this.findAccountList(this.strucId)
				uni.stopPullDownRefresh()
			},
			// 获取部门成员列表
			async findAccountList(strucId) {
				let data = {
					custAccId: this.custAccId,
					strucId: this.strucId
				}
				const res = await uni.$api.authority.findAccountList({
					...data
				})
				this.ygList = res.data
			},
			// 删除角色
			deleteMember() {
				uni.showModal({
					content: '确定删除该成员？',
					confirmColor: "#fd7400",
					confirmText: '确认',
					success: res => {
						if (!res.confirm) return
						this.delMemberConfirm()
					}
				})
			},
			async delMemberConfirm(){
				const res = await uni.$api.authority.deleteEmpById({
					id: this.ygId,
					custAccId: this.custAccId
				})
				uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				if (res.code === 0) {
					this.findAccountList()
				} 
			},
			// 确定选择了-部门
			outradio_depart(resArr){
				let obj = resArr[0] || ''
				if(!obj) return
				this.EditForm.bm = obj.label
				this.addForm.bm = obj.label
				this.saveEmp.department = obj.id
				
				this.empStrucAcc = resArr
				this.empStrucAcc.map((v, i) => {
					this.empStrucAcc[i] = {
						empId: this.ygId,
						struId: v.id,
						custAccId: this.custAccId
					}
				})
			},
			// 确定选择了-角色
			outradio_role(resArr){
				let obj = resArr[0] || ''
				if(!obj) return
				this.EditForm.js = obj.label
				this.addForm.js = obj.label
				this.saveEmp.role = obj.id
			
				this.empRoles = resArr
				this.empRoles.map((v, i) => {
					this.empRoles[i] = {
						acId: this.acId,
						roId: v.id,
						custAccId: this.custAccId
					}
				})
			},
			
			
			// 移动端权限
			MobileChange(e) {
				this.authorizationMobile(e)
			},
			// 移动端权限接口
			async authorizationMobile(e) {
				let data = {
					custAccId: this.custAccId,
					id: e.id,
					isAdminMobile: e.isAdminMobile
				}
				const res = await uni.$api.organization.authorizationMobile(data)
				uni.showToast({
					title: res.msg,
					icon: 'none'
				})
			},
			// 编辑员工
			editYg(e) {
				this.ygId = e.id
				this.findEmpInfoById()
			
			},
			// 查询员工详细
			async findEmpInfoById() {
				const res = await uni.$api.authority.findEmpInfoById({
					id: this.ygId,
					custAccId: this.custAccId,
					acId: this.acId
				})
				this.EditForm.name = res.data.zjEmp.empName
				this.EditForm.phone = res.data.zjEmp.einfoPhone
				this.EditForm.no = res.data.zjEmpAccount.acNo
				this.EditForm.pwd = res.data.zjEmpAccount.acPwd
				this.EditForm.bm = res.data.structures[0].stName
				this.EditForm.js = res.data.zjEmpRoles[0].roName
				this.strucId = res.data.structures[0].id
				if (this.department_data.length > 0) {
					this.currindex4 = this.department_data.findIndex(i => i.stName == this.EditForm.bm);
				}
				if (this.roleList.length > 0) {
					this.currindex5 = this.roleList.findIndex(i => i.label == this.EditForm.js);
				}
				if(this.$refs.cuspop_editMember){
					this.$refs.cuspop_editMember.pupshow = true
				}
			},
			// 编辑员工-保存
			async updateEmp() {
				let data = {
					emp: {
						id: this.ygId,
						empName: this.EditForm.name,
						einfoPhone: this.EditForm.phone,
						custAccId: this.custAccId
					},
					empAccount: {
						id: this.acId,
						acNo: this.EditForm.no
					},
					empStrucAcc: this.empStrucAcc,
					empRoles: this.empRoles
				}
				const res = await uni.$api.authority.updateEmp(this.acId, data)
				setTimeout(() => {
					uni.showToast({
						title: res.msg,
						icon: 'none'
					})
				})
			},
			// 新增员工查询	
			async inquireAccount() {
				if (!this.addForm.no) {
					uni.showToast({
						title: '请输入手机号',
						icon: 'none'
					})
					return
				} 
				let data = {
					account: this.addForm.no,
					custAccId: this.custAccId
				}
				const res = await uni.$api.authority.inquireAccount(data)
				if (res.code == 0) {
					this.addForm.name = res.data.empName
					this.addForm.phone = res.data.einfoPhone
					this.saveEmp.accountId = res.data.acId
				}
				uni.showToast({
					title: res.msg,
					icon: 'none'
				})
			},

			// 添加成员保存
			addMember_save(){
				this.addMemSave()
			},
			addMemSave() {
				this.saveEmp.phone = this.addForm.phone
				this.saveEmp.name = this.addForm.name
				this.saveEmp.acId = this.acId
				this.saveEmp.custAccId = this.custAccId
				this.pullEmp()
				this.findAccountList(this.strucId)
			},
			// 新增员工保存接口
			async pullEmp() {
				let data = this.saveEmp
				const res = await uni.$api.authority.pullEmp(data)
				uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				
			},
			
			searchCountList() {
				this.searchList = [];
				this.ygList.map(val => {
					if(val.name.indexOf(this.keyword) != -1) {
						this.searchList.push(val)
					}
				})
				// console.log(this.searchList)
			},
			
			closeclick() {
				this.EditForm = {
					phone: '',
					name: '',
					no: '',
					pwd: '',
					bm: "",
					js: ''
				}
				this.addForm = {
					phone: '',
					name: "",
					bm: '',
					js: "",
					no: ''
				}
			},
		}
	}
</script>

<style lang="scss">
	/deep/.u-transition {
		z-index: 10065 !important;
	}

	/deep/uni-toast {
		z-index: 99999 !important;
		/* 根据实际情况进行调整 */
	}

	.isActive {
		color: #fff;
		background-color: #fd7400 !important;
		border: 0;
		border-radius: 8rpx;
	}

	.isActive2 {
		color: #fd7400;
		font-weight: 700;
	}

	.popup-v {
		overflow: auto;
		// border:solid 1px red;
		max-height: calc(85vh - env(safe-area-inset-bottom));

		.popup-header {
			padding: 30rpx 60rpx;
			display: flex;
			justify-content: center;

			.close {
				width:
					40rpx;
			}

			.title {
				font-size: 36rpx;
				font-weight: 700;
				width: 100%;
				text-align: center;
			}
		}

		.edit-form {
			padding: 0 60rpx;

			.form-item {
				background-color: #fff;
				justify-content: space-between;
				padding: 30rpx;
				margin-bottom: 30rpx;
				text-align: right;
				border: 1px solid #f5f5f5;
				border-radius: 8rpx;
			}
		}

		
	}
	
	.popup-c {
		max-height: 100%;
		overflow: auto;
	
		.popup-content {
			// padding: 0 60rpx 60rpx 60rpx;
	
			// border: solid 1px red;
			.title {
				margin-bottom: 30rpx;
				border-left: 6rpx solid #fd7400;
				padding: 0 10rpx;
	
			}
	
			.tagA {
				text-align: center;
				padding: 20rpx 0;
				margin-bottom: 30rpx;
				border-radius: 8rpx;
				background-color: #f5f5f5;
				font-size: 24rpx;
			}
		}
	
		.footer {
			position: fixed;
			padding: 60rpx;
			width: 100%;
			justify-content: space-between;
			// position: fixed;
			// bottom: 0;
			background-color: #fff;
			margin-top: 60rpx;
		}
	}
		

	page {
		height: 100%;
	}

	.organization-content {
		height: 100%;
		padding: 30rpx;
		background: #fff3e885;
		overflow: auto;

		&.hidden {
			overflow: hidden;
		}

		.add-card {
			padding: 20rpx;
			margin-bottom: 20rpx;
			background-color: #fff;
			border-radius: 20rpx;

			.left {
				width: 50%;
				border-radius: 8rpx;
				padding: 30rpx;
				background-color: #4ad57496;
			}

			.right {
				width: 50%;
				background-color: #fff3e8;
				padding: 30rpx;
				border-radius: 8rpx;
			}
		}

		.search {
			background-color: #fff;
			padding: 40rpx;
			margin-bottom: 20rpx;
			border-radius: 20rpx;
		}

		.cy-list {
			min-height: calc(100% - 130px);

			.cy-item {
				padding: 40rpx;
				background-color: #fff;
				margin-bottom: 20rpx;
				border-radius: 10px;

				.left {
					height: 120rpx;

					.cy-img {
						border-radius: 8rpx
					}

					.cy-name {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
					}
				}

				.right {
					.cy-switch {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						height: 120rpx;
					}
				}
			}

		}
	}
</style>